package hku.cs.lunuo.tools;

import java.io.File;
import java.util.List;

public class FindClass {
	public static void findAllClass(List<String> set, File f, String prefix) {
		File[] fs = f.listFiles();
		for (File tmpf : fs) {
			String fileName = tmpf.getName();
			if (tmpf.isFile() && fileName.endsWith(".class")) {
				fileName=fileName.substring(0, fileName.indexOf(".class"));
				set.add(prefix + fileName);
			} else if (tmpf.isDirectory()) {
				findAllClass(set, tmpf, prefix + tmpf.getName()+".");
			}
		}
	}
}
